package com.recommend.persistence;

import com.recommend.domain.RecommendDomain;
import com.recommend.dto.admin.RecommendDto;

import java.util.List;

public interface RecommendDomainMapper {
    int deleteByPrimaryKey(Integer recommendId);

    int insert(RecommendDomain record);

    int insertSelective(RecommendDomain record);

    RecommendDomain selectByPrimaryKey(Integer recommendId);

//    @Select("select co.name, m.movie_title, r.timestamp from recommend r, movie m, customer co " +
//            "where r.movie_id = m.movie_id and r.customer_id = co.customer_id " +
//            "and co.name like %#{customerName}% " +
//            "order by r.timestamp desc")
    List<RecommendDto> selectListSelective(RecommendDto recommendDto);

//    @Select("select co.name, m.movie_title, r.timestamp from recommend r, movie m, customer co " +
//            "where r.movie_id = m.movie_id and r.customer_id = co.customer_id " +
//            "order by r.customer_id desc, r.timestamp desc")
    List<RecommendDto> selectAll();

    int updateByPrimaryKeySelective(RecommendDomain record);

    int updateByPrimaryKey(RecommendDomain record);
}